         /*------------------------------------------------------------------------
* JoomNB Dropdown GigaMenu Module
* author    CMSMart Team
* copyright Copyright (C) 2012 http://cmsmart.net. All Rights Reserved.
* @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
* Websites: http://cmsmart.net
* Technical Support:  Forum - http://cmsmart.net/forum
-------------------------------------------------------------------------*/

(function($){
	$(document).ready(function(){
		
		
		$("#basic-options").addClass("icon-equalizer");
		$("#basic-options").click();
		
		$.each([ 1, 2, 3, 4 ], function(key, val){
			$('.select .cms_switch'+val).css('display','none');
			
			var value = ($('.select .cms_switch'+val).val());
			
			var style = ($('.select .cms_switch'+val).val() == 1) ? 'on' : 'off',
					switcher = ('<div id="cms'+val+'" class="switcher-'+style+'"></div');
			$('.select .cms_switch'+val).parent('.select').after(switcher).hide();
			
			$('#cms'+val).click(function (){
				if($('.select .cms_switch'+val).val() == 1){
					$('#cms'+val).attr('class','switcher-off');
					$('.select .cms_switch'+val).val(0);
					
				}else{
					$('#cms'+val).attr('class','switcher-on');
					$('.select .cms_switch'+val).val(1);
				}		
			});
		});

	});
})(jQuery)